package org.nanotek.lucene.index.manage;

import java.io.Serializable;
import java.nio.file.Path;
import java.util.Collection;

import org.apache.lucene.index.IndexWriterConfig.OpenMode;
import org.apache.lucene.util.Version;
import org.nanotek.Configuration;
import org.nanotek.lucene.document.config.LuceneDocument;
import org.nanotek.lucene.index.search.AnalyzerType;
import org.nanotek.lucene.index.search.IndexType;

@SuppressWarnings("serial")
public class IndexConfiguration <R extends LuceneIndex , C extends ConfigurationBase<?>,K extends Serializable> implements Configuration<R,C,K>{

	protected K id; 

	private Path indexPath;
	private Version version;
	private OpenMode openMode;
	private IndexType indexType;
	private AnalyzerType analyzerType;
	//TODO:Implement the stopWords collection configuration.
	private Collection<?> stopWords;
	private Collection<LuceneDocument> documentTypes;
	private Boolean ignoreCase = false;
	

	public IndexConfiguration() {
	}

	public IndexConfiguration(K id) {
		this.id = id;
	}
	
	public K getId() {
		return id;
	}

	public void setId(K id) {
		this.id = id;
	}

	public Version getVersion() {
		return version;
	}


	public void setVersion(Version version) {
		this.version = version;
	}


	public OpenMode getOpenMode() {
		return openMode;
	}


	public void setOpenMode(OpenMode openMode) {
		this.openMode = openMode;
	}


	public Path getIndexPath() {
		return indexPath;
	}


	public void setIndexPath(Path indexPath) {
		this.indexPath = indexPath;
	}


	public IndexType getIndexType() {
		return indexType;
	}

	public void setIndexType(IndexType indexType) {
		this.indexType = indexType;
	}


	public AnalyzerType getAnalyzerType() {
		return analyzerType;
	}

	public void setAnalyzerType(AnalyzerType analyzerType) {
		this.analyzerType = analyzerType;
	}

	public Collection<?> getStopWords() {
		return stopWords;
	}

	public void setStopWords(Collection<?> stopWords) {
		this.stopWords = stopWords;
	}

	public Boolean getIgnoreCase() {
		return ignoreCase;
	}

	public void setIgnoreCase(Boolean ignoreCase) {
		this.ignoreCase = ignoreCase;
	}

	@Override
	public R get() {
		return null;
	}

	@Override
	public C getParameters(K baseKey) {
		return null;
	}
	
	public Collection<LuceneDocument> getDocumentTypes() {
		return documentTypes;
	}

	public void setDocumentTypes(Collection<LuceneDocument> documentTypes) {
		this.documentTypes = documentTypes;
	}
	
}
